package com.superteam.zzl.viewmodel.Search;

import android.util.Log;

import com.superteam.zzl.activity.SearchResultActivity;
import com.superteam.zzl.app.MyApplication;
import com.superteam.zzl.model.Search.LoadData;
import com.superteam.zzl.model.Search.ResultData;
import com.superteam.zzl.model.Search.SearchData;

import java.util.ArrayList;

/**
 * Created by zhang on 2017/1/13.
 */

public class RequestData implements ResultData {

    private Data data;
    public LoadData loadData;

    public RequestData(Data data) {
        this.data = data;
        loadData = new LoadData(this);
    }

    //搜索结果
    @Override
    public void sendSearch(ArrayList<SearchData.PlaceListBean> placeList) {
        data.placeList = placeList;
        SearchResultActivity.handler.sendEmptyMessage(0x222);

    }

    //动态
    @Override
    public void sendDyn(ArrayList<SearchData.TrendListBean> trendList) {
        data.trendList=trendList;
        SearchResultActivity.handler.sendEmptyMessage(0x223);
    }

    //商品
    @Override
    public void sendShop(ArrayList<SearchData.ProductListBean> productList) {
        data.productList=productList;
        SearchResultActivity.handler.sendEmptyMessage(0x224);

    }

    //旅行地
    @Override
    public void sendTra(ArrayList<SearchData.PoiListBean> poiList) {
            data.poiList = poiList;
            SearchResultActivity.handler.sendEmptyMessage(0x225);

    }

    //用户
    @Override
    public void sendUser(ArrayList<SearchData.UserListBean> userList) {
        data.userList=userList;
        SearchResultActivity.handler.sendEmptyMessage(0x226);

    }

    //群组
    @Override
    public void sendGrop(ArrayList<SearchData.GroupListBean> groupList) {
        data.groupList=groupList;
        SearchResultActivity.handler.sendEmptyMessage(0x227);
    }
}
